import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/svg.dart';

enum IconNames {
  tupian, calender_office_date_schedule_manage_cfdfcadc, tianjia, mb_efenggeduosetubiao_gouwuche, wancheng, ziyuan, kulian, jinggao, shanchu_2, fanhui, xingtaidu_icon_sousuo_copy, gengduo_1, chucunguan, shicaibaike, jinzhi_1
}

class IconFont extends StatelessWidget {
  final IconNames name;
  final String color;
  final List<String> colors;
  final double size;

  IconFont(this.name, { this.size = 18, this.color, this.colors });

  static String getColor(int arrayIndex, String color, List<String> colors, String defaultColor) {
    if (color != null && color.isNotEmpty) {
      return color;
    }

    if (colors != null && colors.isNotEmpty && colors.length > arrayIndex) {
      return colors.elementAt(arrayIndex);
    }

    return defaultColor;
  }

  @override
  Widget build(BuildContext context) {
    String svgXml;

    switch (this.name) {
      case IconNames.tupian:
        svgXml = '''
          <svg viewBox="0 0 1281 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M106.806 997.299A80.104 80.104 0 0 1 26.7 917.194V106.806A80.104 80.104 0 0 1 106.806 26.7h1068.057a80.104 80.104 0 0 1 80.104 80.105V931.88a80.104 80.104 0 0 1-80.104 65.419z"
              fill="''' + getColor(0, color, colors, '#9FDBAD') + '''"
            />
            <path
              d="M1174.863 53.403a53.403 53.403 0 0 1 53.403 53.403V929.21a53.403 53.403 0 0 1-53.403 41.387H106.806a53.403 53.403 0 0 1-53.403-53.403V106.806a53.403 53.403 0 0 1 53.403-53.403h1068.057m0-53.403H106.806A106.806 106.806 0 0 0 0 106.806v810.388A106.806 106.806 0 0 0 106.806 1024h1068.057a106.806 106.806 0 0 0 106.806-106.806h-1.335V106.806A106.806 106.806 0 0 0 1173.528 0z"
              fill="''' + getColor(1, color, colors, '#5C2D51') + '''"
            />
            <path
              d="M299.056 400.522a99.863 99.863 0 0 1-100.931-101.466 100.931 100.931 0 1 1 100.931 101.466z"
              fill="''' + getColor(2, color, colors, '#F05071') + '''"
            />
            <path
              d="M299.056 223.491a73.696 73.696 0 0 1 74.764 74.497 75.031 75.031 0 0 1-74.764 75.832 73.429 73.429 0 0 1-74.23-74.764 75.031 75.031 0 0 1 74.23-75.565m0-53.403a128.167 128.167 0 1 0 128.167 127.9 128.167 128.167 0 0 0-128.167-127.9z"
              fill="''' + getColor(3, color, colors, '#5C2D51') + '''"
            />
            <path
              d="M198.125 827.744V734.29l186.91-186.91 70.224 69.958a51.267 51.267 0 0 0 72.361 0l305.732-302.794 252.328 252.061V827.21z"
              fill="''' + getColor(4, color, colors, '#FDCA89') + '''"
            />
            <path
              d="M833.352 352.192l224.559 224.292v224.559H224.826V747.64l160.209-160.208 51.266 51.266a77.968 77.968 0 0 0 110.277 0l286.774-286.506m0-65.152a24.565 24.565 0 0 0-17.356 7.21l-306.8 305.464a24.565 24.565 0 0 1-34.712 0l-71.56-71.56a24.565 24.565 0 0 0-34.711 0l-189.847 189.58a23.23 23.23 0 0 0-6.943 16.555v95.592a23.23 23.23 0 0 0 23.497 24.565h893.163a23.23 23.23 0 0 0 23.23-23.23V564.2a23.23 23.23 0 0 0-6.942-16.555l-253.663-253.93a24.565 24.565 0 0 0-17.356-7.21z"
              fill="''' + getColor(5, color, colors, '#5C2D51') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.calender_office_date_schedule_manage_cfdfcadc:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M864 992H160c-70.4 0-128-57.6-128-128V160c0-70.4 57.6-128 128-128h704c70.4 0 128 57.6 128 128v704c0 70.4-57.6 128-128 128z"
              fill="''' + getColor(0, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M32 144.8v169.6h960V144.8c0-62.4-50.4-112.8-112.8-112.8H144.8C82.4 32 32 82.4 32 144.8z"
              fill="''' + getColor(1, color, colors, '#EC7BB0') + '''"
            />
            <path
              d="M176.8 168.8m-56.8 0a56.8 56.8 0 1 0 113.6 0 56.8 56.8 0 1 0-113.6 0Z"
              fill="''' + getColor(2, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M847.2 168.8m-56.8 0a56.8 56.8 0 1 0 113.6 0 56.8 56.8 0 1 0-113.6 0Z"
              fill="''' + getColor(3, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M512 168.8m-56.8 0a56.8 56.8 0 1 0 113.6 0 56.8 56.8 0 1 0-113.6 0Z"
              fill="''' + getColor(4, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M176.8 232.8c-35.2 0-64.8-28.8-64.8-64.8 0-35.2 28.8-64.8 64.8-64.8s64.8 28.8 64.8 64.8-28.8 64.8-64.8 64.8z m0-112.8c-26.4 0-48.8 21.6-48.8 48.8s21.6 48.8 48.8 48.8 48.8-21.6 48.8-48.8-21.6-48.8-48.8-48.8zM847.2 232.8c-35.2 0-64.8-28.8-64.8-64.8 0-35.2 28.8-64.8 64.8-64.8s64.8 28.8 64.8 64.8c-0.8 36-29.6 64.8-64.8 64.8z m0-112.8c-26.4 0-48.8 21.6-48.8 48.8s21.6 48.8 48.8 48.8 48.8-21.6 48.8-48.8-22.4-48.8-48.8-48.8zM512 232.8c-35.2 0-64.8-28.8-64.8-64.8 0-35.2 28.8-64.8 64.8-64.8s64.8 28.8 64.8 64.8-29.6 64.8-64.8 64.8zM512 120c-26.4 0-48.8 21.6-48.8 48.8s21.6 48.8 48.8 48.8 48.8-21.6 48.8-48.8S538.4 120 512 120z"
              fill="''' + getColor(5, color, colors, '#6A576D') + '''"
            />
            <path
              d="M1000 322.4H24V144.8C24 78.4 78.4 24 144.8 24h734.4c66.4 0 120.8 54.4 120.8 120.8v177.6z m-960-16h944V144.8c0-57.6-47.2-104.8-104.8-104.8H144.8C87.2 40 40 87.2 40 144.8v161.6z"
              fill="''' + getColor(6, color, colors, '#6A576D') + '''"
            />
            <path
              d="M864 1000H160c-75.2 0-136-60.8-136-136V160c0-75.2 60.8-136 136-136h704c75.2 0 136 60.8 136 136v704c0 75.2-60.8 136-136 136zM160 40C93.6 40 40 93.6 40 160v704c0 66.4 53.6 120 120 120h704c66.4 0 120-53.6 120-120V160c0-66.4-53.6-120-120-120H160z"
              fill="''' + getColor(7, color, colors, '#6A576D') + '''"
            />
            <path
              d="M489.6 688.8c6.4 0 9.6 4.8 9.6 11.2S496 712 489.6 712h-120c-10.4 0-16-5.6-16-16 0-9.6 5.6-22.4 10.4-30.4 9.6-18.4 25.6-34.4 50.4-50.4l18.4-12c25.6-16.8 36.8-27.2 36.8-47.2 0-19.2-16-32-40.8-32-31.2 0-40.8 17.6-45.6 36-1.6 5.6-6.4 8-12 8h-4c-5.6-1.6-10.4-4.8-10.4-11.2 0-1.6 0-2.4 0.8-4 2.4-11.2 8.8-23.2 17.6-32 12-12 28.8-19.2 54.4-19.2 40 0 65.6 20.8 65.6 54.4 0 32-20 46.4-44 61.6l-17.6 10.4c-29.6 18.4-46.4 36-52.8 60h108.8zM534.4 529.6c-7.2 0-10.4-4.8-10.4-12 0-6.4 4-12 10.4-12H656c10.4 0 14.4 4.8 14.4 13.6 0 9.6-3.2 13.6-8.8 20.8-29.6 40-52.8 96.8-66.4 161.6-1.6 8.8-7.2 11.2-13.6 11.2h-0.8c-7.2 0-13.6-4-13.6-11.2 0-0.8 0-2.4 0.8-3.2 13.6-60 40-120.8 72.8-169.6H534.4z"
              fill="''' + getColor(8, color, colors, '#6A576D') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.tianjia:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 145.92c202.24 0 366.08 164.352 366.08 366.08s-164.352 366.08-366.08 366.08-366.08-163.84-366.08-366.08 163.84-366.08 366.08-366.08"
              fill="''' + getColor(0, color, colors, '#515151') + '''"
            />
            <path
              d="M512 512m-446.976 0a446.976 446.976 0 1 0 893.952 0 446.976 446.976 0 1 0-893.952 0Z"
              fill="''' + getColor(1, color, colors, '#1391FE') + '''"
            />
            <path
              d="M760.32 551.936h-496.64c-17.408 0-31.744-17.92-31.744-39.936s13.824-39.936 31.744-39.936h496.128c17.408 0 31.744 17.92 31.744 39.936 0.512 22.528-13.824 39.936-31.232 39.936z"
              fill="''' + getColor(2, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M472.064 760.32v-496.64c0-17.408 17.92-31.744 39.936-31.744s39.936 13.824 39.936 31.744v496.128c0 17.408-17.92 31.744-39.936 31.744-22.528 0.512-39.936-13.824-39.936-31.232z"
              fill="''' + getColor(3, color, colors, '#FFFFFF') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.mb_efenggeduosetubiao_gouwuche:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M438.42880095 619.00332753h231.98125827V573.93268307H463.61533757zM551.10541211 709.14461646c0 33.14017975 26.51214381 60.31512715 59.65232355 60.31512716s60.31512715-27.17494739 60.31512716-60.31512716c0-5.30242877-0.66280359-9.94205392-1.98841079-15.24448268h-115.99062913c-1.3256072 4.63962516-1.98841078 9.94205392-1.98841079 15.24448268zM309.8449035 648.82948931c-33.14017975 0-59.65232355 27.17494739-59.65232355 60.31512715s26.51214381 60.31512715 59.65232355 60.31512716 60.31512715-27.17494739 60.31512717-60.31512716-26.51214381-60.31512715-60.31512717-60.31512715zM403.3002104 558.68820038H323.10097541c-3.97682157 0-7.29083955-3.31401797-7.29083955-7.29083954 0-1.3256072 0-2.65121438 0.66280361-3.31401798l27.17494738-49.04746603h59.65232355l-92.7925033-195.52706055h-60.31512715v-60.31512715h98.09493207l28.50055459 60.31512715h333.39020832l16.57008987-30.48896537c2.65121438-3.97682157 3.97682157-9.27925033 3.97682157-14.58167908 0-16.57008987-13.2560719-29.82616178-29.82616178-29.82616178h-444.07840869l-28.50055459-60.31512716H129.56232565v60.31512716h60.31512715l108.03698599 228.0044367-40.43101929 73.57119904c-4.63962516 8.61644674-7.29083955 18.55850066-7.29083955 29.16335819 0 33.14017975 27.17494739 60.31512715 60.31512715 60.31512714H372.81124503c1.3256072-4.63962516 3.31401797-9.27925033 5.30242876-13.91887548l25.18653661-47.05905526z"
              fill="''' + getColor(0, color, colors, '#AAD4FF') + '''"
            />
            <path
              d="M730.72518637 724.38909916c-33.14017975 0-59.65232355 27.17494739-59.65232355 60.31512714s26.51214381 60.31512715 59.65232355 60.31512715 60.31512715-27.17494739 60.31512714-60.31512715c0-33.80298335-27.17494739-60.31512715-60.31512714-60.31512714zM430.47515781 724.38909916c-33.14017975 0-59.65232355 27.17494739-59.65232356 60.31512714s26.51214381 60.31512715 59.65232356 60.31512715 60.31512715-27.17494739 60.31512715-60.31512715c-0.66280359-33.80298335-27.17494739-60.31512715-60.31512715-60.31512714zM438.42880095 619.00332753l24.52373301-45.07064446h224.02761514c22.53532223 0 42.41943008-12.5932683 52.361484-31.15176896l107.3741824-194.86425695c2.65121438-3.97682157 3.97682157-9.27925033 3.97682157-14.5816791 0-16.57008987-13.2560719-29.82616178-29.82616177-29.82616178h-444.07840869l-28.50055459-60.31512715H250.19257995v60.31512715h60.31512715l92.7925033 195.52706055 15.2444827 32.47737616-15.2444827 27.17494739-25.18653661 46.39625166c-2.65121438 4.63962516-3.97682157 9.27925033-5.30242876 13.91887549-1.3256072 4.63962516-1.98841078 9.94205392-1.98841078 15.2444827 0 33.14017975 27.17494739 60.31512715 60.31512716 60.31512715h361.2279593v-60.31512715H443.06842611c-3.97682157 0-7.29083955-3.31401797-7.29083954-7.29083955 0-1.3256072 0-2.65121438 0.6628036-3.31401798l1.98841078-4.63962517z"
              fill="''' + getColor(1, color, colors, '#2B95FF') + '''"
            />
            <path
              d="M138.17877238 686.60929423h-38.44260851v-38.44260851c0-8.61644674-6.62803595-15.24448269-15.24448269-15.24448269s-15.24448269 6.62803595-15.24448268 15.24448269v38.44260851h-38.44260852c-8.61644674 0-15.24448269 6.62803595-15.24448268 15.24448269 0 8.61644674 6.62803595 15.24448269 15.24448268 15.24448268h38.44260852v38.44260852c0 8.61644674 6.62803595 15.24448269 15.24448268 15.24448268s15.24448269-6.62803595 15.24448269-15.24448268v-38.44260852h38.44260851c8.61644674 0 15.24448269-6.62803595 15.24448269-15.24448268-0.66280359-8.61644674-7.29083955-15.24448269-15.24448269-15.24448269z"
              fill="''' + getColor(2, color, colors, '#A8D4FF') + '''"
            />
            <path
              d="M71.89841289 351.23067512h84.83886016v84.83886018H71.89841289z"
              fill="''' + getColor(3, color, colors, '#D9EDFF') + '''"
            />
            <path
              d="M964.69485543 633.58500662m-42.4194301 0a42.41943008 42.41943008 0 1 0 84.83886018 0 42.41943008 42.41943008 0 1 0-84.83886018 0Z"
              fill="''' + getColor(4, color, colors, '#D9EDFF') + '''"
            />
            <path
              d="M918.29860377 171.61090086l-115.32782554-115.32782553c-3.97682157-3.97682157-10.60485751-5.30242877-16.57008988-3.31401799-5.30242877 2.65121438-9.27925033 7.95364315-9.27925032 13.9188755v115.32782555c0 3.97682157 1.98841078 7.95364315 4.63962517 10.60485752 2.65121438 2.65121438 6.62803595 4.63962516 10.60485751 4.63962517h115.32782554c5.96523235 0 11.26766112-3.97682157 13.9188755-9.27925033 1.98841078-5.96523235 0.66280359-12.5932683-3.31401798-16.57008989z m-111.35100396-4.63962515V103.34213058l63.62914512 63.62914513h-63.62914512z"
              fill="''' + getColor(5, color, colors, '#A8D4FF') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.wancheng:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M63.994 512.05a447.956 447.956 0 1 0 895.912 0 447.956 447.956 0 1 0-895.912 0z"
              fill="''' + getColor(0, color, colors, '#20B759') + '''"
            />
            <path
              d="M458.955 649.637L289.272 479.953c-11.7-11.699-30.697-11.699-42.396 0s-11.699 30.697 0 42.396l169.683 169.683c11.7 11.7 30.697 11.7 42.396 0 11.799-11.598 11.799-30.597 0-42.395z"
              fill="''' + getColor(1, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M777.624 332.268c-11.699-11.7-30.697-11.7-42.396 0l-311.07 311.17c-11.698 11.698-11.698 30.696 0 42.395s30.698 11.699 42.396 0l311.07-311.07c11.799-11.798 11.799-30.797 0-42.495z"
              fill="''' + getColor(2, color, colors, '#FFFFFF') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.ziyuan:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z"
              fill="''' + getColor(0, color, colors, '#FFB600') + '''"
            />
            <path
              d="M512 512m-488.96 0a488.96 488.96 0 1 0 977.92 0 488.96 488.96 0 1 0-977.92 0Z"
              fill="''' + getColor(1, color, colors, '#FFE04A') + '''"
            />
            <path
              d="M512 861.090909c-204.8 0-382.138182-65.163636-467.083636-205.730909a488.727273 488.727273 0 0 0 934.167272 0C894.138182 796.16 716.8 861.090909 512 861.090909"
              fill="''' + getColor(2, color, colors, '#FFD05A') + '''"
            />
            <path
              d="M416.814545 380.043636a17.221818 17.221818 0 0 1-16.756363-12.567272c-15.825455-54.225455-42.123636-86.341818-69.818182-85.178182s-58.414545 36.305455-69.818182 84.247273a17.454545 17.454545 0 1 1-33.978182-7.912728c14.661818-64.930909 55.854545-109.847273 102.4-111.243636 21.178182 0 74.938182 8.843636 104.494546 110.312727a17.687273 17.687273 0 0 1-11.869091 21.643637 19.083636 19.083636 0 0 1-4.654546 0.698181zM780.334545 380.043636a17.687273 17.687273 0 0 1-16.756363-12.567272c-15.825455-54.225455-42.123636-86.341818-69.818182-85.178182s-58.647273 36.305455-69.818182 84.247273a17.221818 17.221818 0 0 1-20.712727 13.032727 17.454545 17.454545 0 0 1-13.265455-20.945455c14.894545-64.930909 55.854545-109.847273 102.4-111.243636 21.178182 0 74.938182 8.843636 104.494546 110.312727a17.454545 17.454545 0 0 1-11.869091 21.643637 17.687273 17.687273 0 0 1-4.654546 0.698181zM517.818182 782.429091h-10.007273a224.349091 224.349091 0 0 1-199.447273-144.523636 23.272727 23.272727 0 0 1 13.730909-29.789091 23.272727 23.272727 0 0 1 30.021819 13.730909 177.105455 177.105455 0 0 0 157.789091 114.036363c71.214545 3.025455 133.352727-39.098182 169.425454-116.363636a23.272727 23.272727 0 0 1 42.123636 19.781818c-42.821818 91.461818-116.363636 143.127273-203.636363 143.127273z"
              fill="''' + getColor(3, color, colors, '#353535') + '''"
            />
            <path
              d="M89.6 486.4a87.272727 57.483636 0 1 0 174.545455 0 87.272727 57.483636 0 1 0-174.545455 0Z"
              fill="''' + getColor(4, color, colors, '#FCBD83') + '''"
            />
            <path
              d="M753.338182 486.4a87.272727 57.483636 0 1 0 174.545454 0 87.272727 57.483636 0 1 0-174.545454 0Z"
              fill="''' + getColor(5, color, colors, '#FCBD83') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.kulian:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z"
              fill="''' + getColor(0, color, colors, '#F7B523') + '''"
            />
            <path
              d="M577.828571 0C830.171429 32.914286 1024 248.685714 1024 508.342857c0 208.457143-128 391.314286-307.2 468.114286-25.6 3.657143-51.2 7.314286-76.8 7.314286C365.714286 983.771429 146.285714 760.685714 146.285714 490.057143 146.285714 237.714286 332.8 32.914286 577.828571 0z"
              fill="''' + getColor(1, color, colors, '#FFD635') + '''"
            />
            <path
              d="M749.714286 146.285714c-32.914286-32.914286-124.342857-73.142857-175.542857-73.142857S435.2 113.371429 402.285714 146.285714h347.428572z"
              fill="''' + getColor(2, color, colors, '#FFEF57') + '''"
            />
            <path
              d="M438.857143 475.428571m-73.142857 0a73.142857 73.142857 0 1 0 146.285714 0 73.142857 73.142857 0 1 0-146.285714 0Z"
              fill="''' + getColor(3, color, colors, '#943336') + '''"
            />
            <path
              d="M804.571429 475.428571m-73.142858 0a73.142857 73.142857 0 1 0 146.285715 0 73.142857 73.142857 0 1 0-146.285715 0Z"
              fill="''' + getColor(4, color, colors, '#943336') + '''"
            />
            <path
              d="M621.714286 731.428571c102.4 0 182.857143 131.657143 182.857143 40.228572S676.571429 621.714286 621.714286 621.714286s-182.857143 58.514286-182.857143 149.942857 80.457143-40.228571 182.857143-40.228572z"
              fill="''' + getColor(5, color, colors, '#943336') + '''"
            />
            <path
              d="M446.171429 234.057143c-40.228571 29.257143-69.485714 80.457143-179.2 124.342857-47.542857 40.228571 109.714286 10.971429 175.542857-40.228571 62.171429-54.857143 43.885714-113.371429 3.657143-84.114286zM775.314286 234.057143c40.228571 29.257143 69.485714 80.457143 179.2 124.342857 47.542857 40.228571-109.714286 10.971429-175.542857-40.228571s-43.885714-113.371429-3.657143-84.114286z"
              fill="''' + getColor(6, color, colors, '#F7B523') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.jinggao:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M950.859 813.625v-0.126L567.624 149.724h-0.064c-4.802-17.672-26.694-30.924-53.007-30.924-26.508 0-48.336 13.575-52.947 31.437L69.345 829.568l0.321 0.45c-8.963 8.899-7.234 30.024 4.929 49.743 12.225 20.104 30.664 31.309 42.573 26.699l0.449 0.703h793.995l0.449-1.025c13.252 2.051 29.58-9.603 39.76-30.343 11.909-23.881 11.137-50.768-0.962-62.17z m-438.674 23.437"
              fill="''' + getColor(0, color, colors, '#E90000') + '''"
            />
            <path
              d="M460.797 358.432c0-29.385 23.881-53.202 53.202-53.202 29.449 0 53.202 23.817 53.202 53.202v274.204c0 29.321-23.753 53.202-53.202 53.202-29.321 0-53.202-23.881-53.202-53.202V358.432z m53.201 478.63c-31.95 0-57.876-25.932-57.876-57.94 0-31.95 25.926-57.75 57.876-57.75 31.945 0 57.876 25.8 57.876 57.75 0 31.944-25.931 57.94-57.876 57.94z m0 0"
              fill="''' + getColor(1, color, colors, '#FFFFFF') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.shanchu_2:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M519.620465 0c-103.924093 0-188.511256 82.467721-192.083349 185.820279H85.015814A48.91386 48.91386 0 0 0 36.101953 234.686512a48.91386 48.91386 0 0 0 48.913861 48.866232h54.010046V831.345116c0 102.852465 69.822512 186.844279 155.909954 186.844279h439.200744c86.087442 0 155.909953-83.491721 155.909954-186.844279V284.100465h48.91386a48.91386 48.91386 0 0 0 48.913861-48.890046 48.91386 48.91386 0 0 0-48.913861-48.866233h-227.756651A191.559442 191.559442 0 0 0 519.620465 0z m-107.234232 177.080558c3.548279-49.771163 46.627721-88.540279 99.851907-88.540279 53.224186 0 96.327442 38.745302 99.351813 88.540279h-199.20372z m-111.997024 752.044651c-30.981953 0-65.083535-39.15014-65.083535-95.041488V287.744h575.488v546.839814c0 55.915163-34.077767 95.041488-65.059721 95.041488H300.389209v-0.500093z"
              fill="''' + getColor(0, color, colors, '#8a8a8a') + '''"
            />
            <path
              d="M368.116093 796.814884c24.361674 0 44.27014-21.670698 44.27014-48.818605v-278.623256c0-27.147907-19.908465-48.818605-44.27014-48.818604-24.33786 0-44.27014 21.670698-44.27014 48.818604v278.623256c0 27.147907 19.360744 48.818605 44.293954 48.818605z m154.933581 0c24.361674 0 44.293953-21.670698 44.293954-48.818605v-278.623256c0-27.147907-19.932279-48.818605-44.293954-48.818604-24.33786 0-44.27014 21.670698-44.270139 48.818604v278.623256c0 27.147907 19.932279 48.818605 44.293953 48.818605z m132.810419 0c24.33786 0 44.27014-21.670698 44.27014-48.818605v-278.623256c0-27.147907-19.932279-48.818605-44.27014-48.818604s-44.27014 21.670698-44.27014 48.818604v278.623256c0 27.147907 19.360744 48.818605 44.27014 48.818605z"
              fill="''' + getColor(1, color, colors, '#8a8a8a') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.fanhui:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M0 0h1024v1024H0z"
              fill="''' + getColor(0, color, colors, '#D8D8D8') + '''"
              fill-opacity="0"
            />
            <path
              d="M701.553778 1024a39.424 39.424 0 0 1-27.420445-10.979556l-491.349333-474.453333a36.636444 36.636444 0 0 1 0-53.077333L674.133333 10.979556a39.765333 39.765333 0 0 1 54.840889 0 36.636444 36.636444 0 0 1 0 53.020444L265.045333 512l463.928889 448a36.636444 36.636444 0 0 1 0 53.020444 39.424 39.424 0 0 1-27.420444 10.979556z"
              fill="''' + getColor(1, color, colors, '#808080') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.xingtaidu_icon_sousuo_copy:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M222.6944 222.7968A323.1488 323.1488 0 0 0 133.6832 512c19.2512-87.3728 64.512-172.7488 135.0144-243.3024C339.2512 198.1184 424.6272 152.8832 512 133.632c-101.632-19.1488-210.688 10.5216-289.3056 89.1648z"
              fill="''' + getColor(0, color, colors, '#bfbfbf') + '''"
            />
            <path
              d="M989.44 822.1184l-121.7024-121.7024a118.016 118.016 0 0 0-92.8-34.1248c114.4576-165.5552 97.92-394.3936-49.4848-541.824-165.9392-165.9904-435.0464-165.9904-601.0368 0-165.9392 165.9904-165.9392 435.1232 0 601.1136 147.4048 147.4304 376.064 163.84 541.7216 49.3824-2.56 33.28 8.8576 67.5328 34.1248 92.8l121.7024 121.728c46.08 45.9776 121.3696 45.9776 167.3472 0 46.208-45.9776 46.208-121.2928 0.128-167.3728zM676.096 676.096c-138.6752 138.6752-363.392 138.6752-502.016 0-138.6752-138.6752-138.6752-363.4432 0-502.1184 138.624-138.6752 363.3408-138.6752 502.016 0 138.6496 138.5728 138.6496 363.4432 0 502.1184z"
              fill="''' + getColor(1, color, colors, '#bfbfbf') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.gengduo_1:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z"
              fill="''' + getColor(0, color, colors, '#FD83B1') + '''"
            />
            <path
              d="M289.391304 395.642435A106.317913 106.317913 0 0 1 395.642435 289.391304a106.317913 106.317913 0 0 1 106.228869 106.251131v63.799652a42.518261 42.518261 0 0 1-42.429217 42.429217h-63.799652A106.317913 106.317913 0 0 1 289.391304 395.642435z m169.984 0a63.821913 63.821913 0 0 0-63.732869-63.755131 63.821913 63.821913 0 0 0-63.755131 63.755131 63.821913 63.821913 0 0 0 63.755131 63.732869h63.732869v-63.732869zM289.391304 650.618435a106.317913 106.317913 0 0 1 106.251131-106.22887h63.799652a42.518261 42.518261 0 0 1 42.429217 42.429218v63.799652A106.317913 106.317913 0 0 1 395.642435 756.869565 106.317913 106.317913 0 0 1 289.391304 650.618435z m106.251131-63.73287a63.821913 63.821913 0 0 0-63.755131 63.73287 63.821913 63.821913 0 0 0 63.755131 63.75513 63.821913 63.821913 0 0 0 63.732869-63.75513v-63.73287h-63.732869z m148.74713-191.24313A106.317913 106.317913 0 0 1 650.618435 289.391304 106.317913 106.317913 0 0 1 756.869565 395.642435a106.317913 106.317913 0 0 1-106.25113 106.228869h-63.799652a42.518261 42.518261 0 0 1-42.429218-42.429217v-63.799652z m106.22887 63.732869a63.821913 63.821913 0 0 0 63.75513-63.732869 63.821913 63.821913 0 0 0-63.75513-63.755131 63.821913 63.821913 0 0 0-63.73287 63.755131v63.732869h63.73287z m0 127.510261a63.75513 63.75513 0 1 1-63.73287 63.73287v-78.402783a21.25913 21.25913 0 0 0-42.518261 0v78.402783a106.25113 106.25113 0 1 0 106.251131-106.22887 21.23687 21.23687 0 0 0 0 42.496z"
              fill="''' + getColor(1, color, colors, '#FFFFFF') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.chucunguan:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M244.260887 55.017647h613.349357v146.49876H244.260887z"
              fill="''' + getColor(0, color, colors, '#838BC5') + '''"
            />
            <path
              d="M811.070286 268.021255v-71.368435H290.800845v71.368435l-87.920753 111.231038v473.554824l193.455214 171.192883h309.187084l193.468649-171.192883V379.252293l-87.920753-111.231038z"
              fill="''' + getColor(1, color, colors, '#8F5B8D') + '''"
            />
            <path
              d="M793.174436 173.369406H179.825078a13.435323 13.435323 0 0 1-13.435322-13.435323v-146.445019a13.435323 13.435323 0 0 1 13.435322-13.435323h613.349358a13.435323 13.435323 0 0 1 13.435323 13.435323v146.445019a13.435323 13.435323 0 0 1-13.435323 13.435323z m-599.914035-26.870646h586.478712v-119.574373H193.260401z"
              fill="''' + getColor(2, color, colors, '#5B2D61') + '''"
            />
            <path
              d="M623.714709 715.296587c0 73.894276-89.519556 133.721768-199.944474 133.721768S223.825761 789.177428 223.825761 715.296587s89.519556-133.681462 199.944474-133.681462 199.944474 59.827493 199.944474 133.681462z"
              fill="''' + getColor(3, color, colors, '#FFD7E9') + '''"
            />
            <path
              d="M430.729732 581.695737c-6.623614-50.489943 6.529567-95.471404 40.117874-120.125221 59.531915-43.664799 160.767073-6.905756 226.076177 82.116693s70.024903 196.666256 10.492988 240.331055c-31.465526 23.068449-74.552606 23.686474-117.854652 6.03246"
              fill="''' + getColor(4, color, colors, '#FFD7E9') + '''"
            />
            <path
              d="M423.770235 873.658738c-56.038732 0-108.893292-14.711678-148.849942-41.421101-41.649501-27.824554-64.48955-65.376281-64.489549-105.73599s22.920661-77.924872 64.489549-105.70912c39.95665-26.588504 92.81121-41.367359 148.849942-41.367359s108.906727 14.778855 148.809636 41.407665c41.649501 27.824554 64.48955 65.362846 64.489549 105.70912s-22.920661 77.924872-64.489549 105.73599c-39.902909 26.709422-92.703728 41.380794-148.809636 41.380795z m0-267.362925c-50.772085 0-98.333128 13.09944-133.909863 36.879961-33.910755 22.678825-52.599289 52.276841-52.599289 83.299002s18.688534 60.714224 52.599289 83.393049c35.576735 23.861133 83.124342 36.920267 133.909863 36.920267s98.346563-13.09944 133.909863-36.893397c33.92419-22.678825 52.599289-52.290276 52.599288-83.393048s-18.675099-60.687353-52.599288-83.299002c-35.5633-23.807392-83.178084-36.906832-133.909863-36.906832z"
              fill="''' + getColor(5, color, colors, '#5B2D61') + '''"
            />
            <path
              d="M647.817678 827.011297c-20.152984 0-41.568889-4.406786-63.307241-13.274099a13.435323 13.435323 0 0 1 10.143669-24.882218c40.305968 16.45827 78.556333 14.778855 104.795518-4.433657 25.056877-18.379522 37.88761-50.946744 36.100713-91.722949-1.86751-42.778068-19.427477-88.874661-49.468859-129.798653s-68.735112-71.529659-108.973904-86.14729c-38.344411-13.93243-73.276251-11.473766-98.346563 6.905755-28.308225 20.771009-40.964299 59.975281-34.730309 107.482583a13.435323 13.435323 0 1 1-26.642245 3.493184c-7.550651-57.570358 9.028537-105.937521 45.492003-132.700684 32.526917-23.847698 76.35294-27.582718 123.40344-10.492987 45.169555 16.417964 88.310377 50.328719 121.455318 95.498275s52.558983 96.505924 54.654894 144.537203c2.189958 50.019707-14.523584 90.7153-47.02363 114.562998-18.970676 13.9593-42.200349 20.972539-67.552804 20.972539z"
              fill="''' + getColor(6, color, colors, '#5B2D61') + '''"
            />
            <path
              d="M641.100017 1000.716586H331.899497a13.435323 13.435323 0 0 1-8.894183-3.372266l-193.468649-171.179449A13.435323 13.435323 0 0 1 125.008961 816.101815V342.533556a13.435323 13.435323 0 0 1 2.888595-8.329901l85.032158-107.563194v-66.706378a13.435323 13.435323 0 0 1 13.435323-13.435323h520.269441a13.435323 13.435323 0 0 1 13.435323 13.435323v66.706378l85.018723 107.563194a13.435323 13.435323 0 0 1 2.902029 8.329901v473.568259a13.435323 13.435323 0 0 1-4.527704 10.063056l-193.468648 171.179449a13.435323 13.435323 0 0 1-8.894184 3.372266z m-304.095097-26.870646h299.00311l185.125313-163.790021v-462.846871l-85.018723-107.57663a13.435323 13.435323 0 0 1-2.90203-8.3299v-57.933112H239.800359v57.933112a13.435323 13.435323 0 0 1-2.902029 8.3299L151.879607 347.209048v462.846871z"
              fill="''' + getColor(7, color, colors, '#5B2D61') + '''"
            />
            <path
              d="M594.065639 215.787407l22.471921-14.733175 90.018006 137.300938-22.470577 14.733175zM544.446305 313.244552l22.571342-14.778855 65.064581 99.371678-22.571342 14.778855z"
              fill="''' + getColor(8, color, colors, '#5B2D61') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.shicaibaike:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M933.376 1010.176H90.624c-29.696 0-53.76-24.064-53.76-53.76V67.584c0-29.696 24.064-53.76 53.76-53.76h842.752c29.696 0 53.76 24.064 53.76 53.76v888.832c0 29.696-24.064 53.76-53.76 53.76z"
              fill="''' + getColor(0, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M842.752 1024H181.248C93.696 1024 23.04 952.832 23.04 865.792V158.208C23.04 71.168 94.208 0 181.248 0H842.24c87.552 0 158.208 71.168 158.208 158.208V865.28c0.512 87.552-70.656 158.72-157.696 158.72zM181.248 27.648c-72.192 0-130.56 58.368-130.56 130.56V865.28c0 72.192 58.88 131.072 131.072 131.072h660.992c72.192 0 131.072-58.88 131.072-131.072V158.208c0-72.192-58.88-131.072-131.072-131.072H181.248z"
              fill="''' + getColor(1, color, colors, '#333333') + '''"
            />
            <path
              d="M845.312 912.896H175.616c-29.696 0-53.76-24.064-53.76-53.76V194.048c0-29.696 24.064-53.76 53.76-53.76h669.696c29.696 0 53.76 24.064 53.76 53.76v665.088c0 29.696-24.064 53.76-53.76 53.76z"
              fill="''' + getColor(2, color, colors, '#A3D4F2') + '''"
            />
            <path
              d="M116.224 257.024h420.352v46.08H116.224z m0 231.936h420.352v46.08H116.224z m0 231.936h420.352v46.08H116.224zM860.16 277.504c4.096-5.12 4.096-13.824-1.024-17.92-5.12-5.12-12.8-5.12-17.92-1.024L672.768 427.008 590.336 345.6c-3.072-3.072-8.704-4.096-12.8-3.072s-8.704 5.12-10.752 9.728c-1.024 4.096 0 9.728 3.072 12.8l88.064 87.04c7.168 7.168 19.968 7.168 28.672 0L860.16 277.504zM620.544 793.088a13.988 13.988 0 0 1-13.824-13.824c0-3.584 1.536-7.168 4.096-9.728l172.032-172.032c5.632-5.632 14.336-5.632 19.456 0 2.56 2.56 4.096 6.144 4.096 9.728s-1.536 7.168-4.096 9.728L630.272 788.992c-2.56 2.56-6.144 4.096-9.728 4.096z"
              fill="''' + getColor(3, color, colors, '#FFFFFF') + '''"
            />
            <path
              d="M792.576 793.088c-3.584 0-7.168-1.536-9.728-4.096L610.816 616.96c-2.56-2.56-4.096-6.144-4.096-9.728s1.536-7.168 4.096-9.728c5.632-5.632 14.336-5.632 19.456 0l172.032 172.032c2.56 2.56 4.096 6.144 4.096 9.728a13.988 13.988 0 0 1-13.824 13.824z"
              fill="''' + getColor(4, color, colors, '#FFFFFF') + '''"
            />
          </svg>
        ''';
        break;
      case IconNames.jinzhi_1:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 0.799375C229.820453 0.799375 0.399688 230.220141 0.399688 511.600312c0 281.380172 229.420765 510.800937 511.600312 510.800937 282.179547 0 511.600312-229.420765 511.600312-510.800937C1023.600312 230.220141 794.179547 0.799375 512 0.799375L512 0.799375zM120.306011 511.600312C120.306011 295.768931 296.168618 120.705699 512 120.705699c83.135051 0 159.075722 25.580016 222.226386 69.545667l-544.374707 543.575332C146.685402 670.676034 120.306011 594.735363 120.306011 511.600312L120.306011 511.600312zM512 902.494926c-79.937549 0-155.078845-23.981265-217.430133-65.54879l542.775956-541.976581c41.567525 62.351288 65.54879 136.693208 65.54879 216.630757C903.693989 727.431694 727.831382 902.494926 512 902.494926L512 902.494926zM512 902.494926"
              fill="''' + getColor(0, color, colors, '#d4237a') + '''"
            />
            <path
              d="M512 0c-282.179547 0-511.600312 228.62139-511.600312 511.600312 0 282.179547 228.62139 511.600312 511.600312 511.600312 282.179547 0 511.600312-228.62139 511.600312-511.600312C1023.600312 229.420765 794.179547 0 512 0zM217.030445 216.630757c79.138173-79.138173 183.856362-122.30445 294.969555-122.30445 96.724434 0 187.85324 32.774395 262.19516 92.727557L186.654176 773.795472C126.701015 699.453552 94.725995 608.324746 94.725995 511.600312 94.725995 400.487119 137.892272 295.768931 217.030445 216.630757zM806.969555 807.369243c-79.138173 79.138173-183.856362 122.30445-294.969555 122.30445-95.125683 0-185.455113-31.97502-258.997658-89.530055L839.74395 253.40203c58.354411 73.542545 89.530055 163.0726 89.530055 258.198283C929.274005 623.512881 886.107728 728.231069 806.969555 807.369243z"
              fill="''' + getColor(1, color, colors, '#d4237a') + '''"
            />
          </svg>
        ''';
        break;

    }

    if (svgXml == null) {
      return new Container(width: 0, height: 0);
    }

    return SvgPicture.string(svgXml, width: this.size, height: this.size);
  }
}
